package ooday04;
import java.util.Timer;
import java.util.TimerTask;
public class TimerTest {
    public static void main(String[] args) {
        /*
        Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            public void run() {
                System.out.println("该学习啦");
            }
        }, 1000,interval);

        Timer timer=new Timer();
        int interval=1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("该学习了");
            }
        }, interval,interval);

         */
        Timer timer=new Timer();
        int interval=1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
            }
        },interval,interval);

    }
}




































